package uscdb.dao.impl;

import java.util.HashMap;
import java.util.Map;

import org.springframework.stereotype.Repository;

import uscdb.dao.ScriptDaoI;
import uscdb.model.Tscript;

@Repository
public class ScriptDaoImpl extends BaseDaoImpl<Tscript> implements ScriptDaoI {

	@Override
	public Tscript getByNumber(String testcaseNumber) {
		String hql = "from Tscript t where t.testcaseNumber = :testcaseNumber";
		Map<String, Object> params = new HashMap<String, Object>();
		params.put("testcaseNumber", testcaseNumber);
		Tscript tscript = get(hql, params);
		if (null != tscript) {
			return tscript;
		}
		return null;
	}

}
